import request from '@/util/request'
// 加载品牌列表
export function loadBrand(query) {
  return request({
    url: '/aqs/spuSearch/brand.json',
    method: 'post',
    data: query,
    baseURL: process.env.VUE_APP_AJS_INDEX
  })
}

// 加载商品列表
export function loadSpu(size, index, query) {
  return request({
    url: `/aqs/spuSearch/spuList/${size}/${index}.json`,
    method: 'post',
    data: query,
    baseURL: process.env.VUE_APP_AJS_INDEX
  })
}
//  计算运费
export function loadFee(query) {
  return request({
    url: '/aqs/spuSearch/freightFee.json',
    method: 'post',
    data: query,
    baseURL: process.env.VUE_APP_AJS_INDEX
  })
}
//  校验条件
export function checkCondition(query) {
  return request({
    url: '/aqs/spuSearch/checkCondition.json',
    method: 'post',
    data: query,
    baseURL: process.env.VUE_APP_AJS_INDEX
  })
}
//  获取联系方式
export function getContactWay(spuId) {
  return request({
    url: `/aqs/searchOrDetail/getContactWay/${spuId}.json`,
    method: 'get',
    baseURL: process.env.VUE_APP_AJS_INDEX
  })
}
